package com.zhiche.lisa.tms.dao.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.zhiche.lisa.tms.dao.model.ShipOrderItem;
import com.zhiche.lisa.tms.dto.ReceiptDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 运单货物明细 Mapper 接口
 * </p>
 *
 * @author qichao
 * @since 2018-06-18
 */
public interface ShipOrderItemMapper extends BaseMapper<ShipOrderItem> {

    ShipOrderItem selectByIdNotenant(@Param("id") Long id);

    List<ShipOrderItem> selectListNotenant(@Param("ew") EntityWrapper<ShipOrderItem> itemEW);

    /**
     * 根据装车CODE得到运单货物明细列表
     * @param code 装车code
     * @return
     */
    List<Map<String, Object>> selectShipOrderItemByShipCode(@Param("code") String code);

    List<ShipOrderItem> selectByShipmentId(@Param("shipmentId")String shipmentId) ;

    List<String> selectWmsNotShippedNotenant(Page<ShipOrderItem>page);

    void updateShipTime(@Param("ew") EntityWrapper<ShipOrderItem> ew);

    List<ReceiptDTO> getReceiptListNotenant(Page<ReceiptDTO> page,@Param("ew") EntityWrapper<ShipOrderItem> ew);

    List<ReceiptDTO> exportReceiptListNotenant(@Param("ew")EntityWrapper<ShipOrderItem> ew);

    ShipOrderItem getShipOrderItemByOrderNo(@Param("orderNo")String orderNo ,@Param("itemSourceKey")String itemSourceKey);

    List<ShipOrderItem> getListNotenant(@Param("ew")EntityWrapper<ShipOrderItem> shipOrderItemWrapper);

}
